package com.code.day16;

import java.util.Arrays;
import java.util.function.Supplier;

public class SupplierLambda {
    public static void main(String[] args) {
        method(()->{
            int[] arr = {5,34,54,6,54,4,6,7};
            Arrays.sort(arr);
            return arr[arr.length-1];
        });
    }
    public static void method(Supplier<Integer> supplier){
        Integer integer = supplier.get();
        System.out.println("integer:"+ integer);

    }
}
